<template>
	<div class="text">
		<slot :title="title" name="header">{{title}}</slot>
		<slot :user="user">{{ user.lastName }}</slot>
		<slot name="footer"></slot>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				title:'我是子组件这边过来的标题',
				user:{
					lastName:'子组件数据---张三',
					firstName:'子组件数据---李四'
				}
			}
		}
	}
</script>

<style scoped>
	.text{
		font-size:14px;
		margin:6px 14px;
		line-height: 20px;
	}
</style>
